package com.ruicar.afs.cloud.channel.common.task;

import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.ruicar.afs.cloud.channel.online.entity.ChannelAuthorizeVehicleTemp;
import com.ruicar.afs.cloud.channel.online.service.ChannelAuthorizeVehicleTempService;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.RestController;

import java.util.ArrayList;
import java.util.List;

/**
 * @author mingzhi.li
 */
@Slf4j
@Component
@RestController
@AllArgsConstructor
public class AuthorizationModelTask {
    /**
     * 风控信息表
     */
    private ChannelAuthorizeVehicleTempService service;

    /**
     * 每天上午10点、下午14点、下午16点执行
     */
    @Scheduled(cron = "0 0 10,14,16 * * ?")
    public void start() {
        //Step1：查询额度信息表数据并更新数据库
        List<ChannelAuthorizeVehicleTemp> list = service.list(Wrappers.<ChannelAuthorizeVehicleTemp>query().lambda());
        List<ChannelAuthorizeVehicleTemp> infoList =new ArrayList<>();
        if(list!=null && list.size()>0){

        }
    }
}
